﻿using Heima.OA.IBLL;
using Heima.OA.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Heima.OA.UI.Portal.Controllers
{
    public class OrderInfoController : Controller
    {
        // GET: OrderInfo
        public IOrderInfoService OrderInfoService { get; set; }
        public ActionResult Index()
        {
            ViewData.Model =  OrderInfoService.GetEntities(u => true).ToList();
            return View();
        }
        public ActionResult Create()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Create(OrderInfo orderInfo)
        {
            if (ModelState.IsValid)
            {
                OrderInfoService.Add(orderInfo);
            }
            return RedirectToAction("Index");
        }

    }
}